/*
 * @Author: tanjunyi@doctorwork.com
 * @Date: 2020-05-03 15:23:33
 * @LastEditors: tanjunyi@doctorwork.com
 * @LastEditTime: 2020-05-03 15:29:23
 * @Description:
 */


let org = { name: "caroline", info: { address: 'danlu' } }
let proxy = new Proxy(org, {
	get: (target, prop, reciever) => {
		console.log(`---- %c 正在触发get，prop：${prop}`)
		return Reflect.get(target, prop, reciever);
	},
	set: (target, prop, value, reciever) => {
		console.log(`++++ 正在触发set，prop：${prop}`)
		return Reflect.set(target, prop, value, reciever);
	}
})

proxy.name++;
proxy.info++;